class i2c_trans extends uvm_sequence_item;
    typedef enum {READ, WRITE} kind_e;
    rand kind_e kind;

    rand bit [7:0] addr;
    rand bit [31:0] data;

    constraint addr_vld {
        addr inside {0,4,8,12,16}; // write at 0,4,8,12,16
    }


    `uvm_object_utils_begin(i2c_trans)
        `uvm_field_enum(kind_e, kind, UVM_ALL_ON)
        `uvm_field_int(addr, UVM_ALL_ON)
        `uvm_field_int(data, UVM_ALL_ON)
    `uvm_object_utils_end


    function new(string name = "apb_trans");
        super.new(name);
        `uvm_info("TRACE", $sformatf("%m"), UVM_HIGH)
    endfunction: new

endclass